Integrand size = 16, antiderivative size = 107 \[ \int \frac {\sin ^3(x)}{(a \cos (x)+b \sin (x))^2} \, dx=\frac {6 a^2 b \text {arctanh}\left (\frac {-b+a \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}}+\frac {3 a \left (a^2-b^2\right )+a \left (a^2+b^2\right ) \cos (2 x)-b \left (a^2+b^2\right ) \sin (2 x)}{2 \left (a^2+b^2\right )^2 (a \cos (x)+b \sin (x))} \]
6*a^2*b*arctanh((-b+a*tan(1/2*x))/(a^2+b^2)^(1/2))/(a^2+b^2)^(5/2)+1/2*(3* a*(a^2-b^2)+a*(a^2+b^2)*cos(2*x)-b*(a^2+b^2)*sin(2*x))/(a^2+b^2)^2/(a*cos( x)+b*sin(x))
Time = 0.60 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.00 \[ \int \frac {\sin ^3(x)}{(a \cos (x)+b \sin (x))^2} \, dx=\frac {6 a^2 b \text {arctanh}\left (\frac {-b+a \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}}+\frac {3 a \left (a^2-b^2\right )+a \left (a^2+b^2\right ) \cos (2 x)-b \left (a^2+b^2\right ) \sin (2 x)}{2 \left (a^2+b^2\right )^2 (a \cos (x)+b \sin (x))} \]
(6*a^2*b*ArcTanh[(-b + a*Tan[x/2])/Sqrt[a^2 + b^2]])/(a^2 + b^2)^(5/2) + ( 3*a*(a^2 - b^2) + a*(a^2 + b^2)*Cos[2*x] - b*(a^2 + b^2)*Sin[2*x])/(2*(a^2 + b^2)^2*(a*Cos[x] + b*Sin[x]))
Leaf count is larger than twice the leaf count of optimal. \(283\) vs. \(2(107)=214\).
Time = 1.23 (sec) , antiderivative size = 283, normalized size of antiderivative = 2.64, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3042, 4901, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sin ^3(x)}{(a \cos (x)+b \sin (x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (x)^3}{(a \cos (x)+b \sin (x))^2}dx\) |
\(\Big \downarrow \) 4901 |
\(\displaystyle \int \left (-\frac {a^3 \cos ^3(x)}{b^3 (a \cos (x)+b \sin (x))^2}+\frac {3 a^2 \cos ^2(x)}{b^3 (a \cos (x)+b \sin (x))}-\frac {2 a \cos (x)}{b^3}+\frac {\sin (x)}{b^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 a^2 \left (3 a^2+b^2\right ) \text {arctanh}\left (\frac {b-a \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b \left (a^2+b^2\right )^{5/2}}-\frac {2 a^2 b \text {arctanh}\left (\frac {b-a \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}}-\frac {3 a^2 \text {arctanh}\left (\frac {b \cos (x)-a \sin (x)}{\sqrt {a^2+b^2}}\right )}{b \left (a^2+b^2\right )^{3/2}}+\frac {3 a^2 \cos (x)}{b^2 \left (a^2+b^2\right )}+\frac {2 a^2 \left (a+b \tan \left (\frac {x}{2}\right )\right )}{\left (a^2+b^2\right )^2 \left (-a \tan ^2\left (\frac {x}{2}\right )+a+2 b \tan \left (\frac {x}{2}\right )\right )}+\frac {3 a^3 \sin (x)}{b^3 \left (a^2+b^2\right )}-\frac {2 a^3 \cos ^2\left (\frac {x}{2}\right ) \left (\left (a^2-b^2\right ) \tan \left (\frac {x}{2}\right )+2 a b\right )}{b^3 \left (a^2+b^2\right )^2}-\frac {2 a \sin (x)}{b^3}-\frac {\cos (x)}{b^2}\) |
(-3*a^2*ArcTanh[(b*Cos[x] - a*Sin[x])/Sqrt[a^2 + b^2]])/(b*(a^2 + b^2)^(3/ 2)) - (2*a^2*b*ArcTanh[(b - a*Tan[x/2])/Sqrt[a^2 + b^2]])/(a^2 + b^2)^(5/2 ) + (2*a^2*(3*a^2 + b^2)*ArcTanh[(b - a*Tan[x/2])/Sqrt[a^2 + b^2]])/(b*(a^ 2 + b^2)^(5/2)) - Cos[x]/b^2 + (3*a^2*Cos[x])/(b^2*(a^2 + b^2)) - (2*a*Sin [x])/b^3 + (3*a^3*Sin[x])/(b^3*(a^2 + b^2)) - (2*a^3*Cos[x/2]^2*(2*a*b + ( a^2 - b^2)*Tan[x/2]))/(b^3*(a^2 + b^2)^2) + (2*a^2*(a + b*Tan[x/2]))/((a^2 + b^2)^2*(a + 2*b*Tan[x/2] - a*Tan[x/2]^2))
3.1.15.3.1 Defintions of rubi rules used
Int[u_, x_Symbol] :> With[{v = ExpandTrig[u, x]}, Int[v, x] /; SumQ[v]] /; !InertTrigFreeQ[u]
Time = 0.61 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.31
method | result | size |
default | \(-\frac {4 \left (\tan \left (\frac {x}{2}\right ) a b -\frac {a^{2}}{2}+\frac {b^{2}}{2}\right )}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \left (1+\tan \left (\frac {x}{2}\right )^{2}\right )}+\frac {4 a^{2} \left (\frac {-\frac {b \tan \left (\frac {x}{2}\right )}{2}-\frac {a}{2}}{\tan \left (\frac {x}{2}\right )^{2} a -2 b \tan \left (\frac {x}{2}\right )-a}+\frac {3 b \,\operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{2 \sqrt {a^{2}+b^{2}}}\right )}{a^{4}+2 a^{2} b^{2}+b^{4}}\) | \(140\) |
risch | \(\frac {{\mathrm e}^{i x}}{-4 i b a +2 a^{2}-2 b^{2}}+\frac {{\mathrm e}^{-i x}}{4 i b a +2 a^{2}-2 b^{2}}+\frac {2 a^{3} {\mathrm e}^{i x}}{\left (-i b \,{\mathrm e}^{2 i x}+a \,{\mathrm e}^{2 i x}+i b +a \right ) \left (i b +a \right )^{2} \left (-i b +a \right )^{2}}-\frac {3 i b \,a^{2} \ln \left ({\mathrm e}^{i x}+\frac {i b +a}{\sqrt {-a^{2}-b^{2}}}\right )}{\sqrt {-a^{2}-b^{2}}\, \left (a^{2}+b^{2}\right )^{2}}+\frac {3 i b \,a^{2} \ln \left ({\mathrm e}^{i x}-\frac {i b +a}{\sqrt {-a^{2}-b^{2}}}\right )}{\sqrt {-a^{2}-b^{2}}\, \left (a^{2}+b^{2}\right )^{2}}\) | \(211\) |
-4/(a^4+2*a^2*b^2+b^4)*(tan(1/2*x)*a*b-1/2*a^2+1/2*b^2)/(1+tan(1/2*x)^2)+4 *a^2/(a^4+2*a^2*b^2+b^4)*((-1/2*b*tan(1/2*x)-1/2*a)/(tan(1/2*x)^2*a-2*b*ta n(1/2*x)-a)+3/2*b/(a^2+b^2)^(1/2)*arctanh(1/2*(2*a*tan(1/2*x)-2*b)/(a^2+b^ 2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 240 vs. \(2 (99) = 198\).
Time = 0.27 (sec) , antiderivative size = 240, normalized size of antiderivative = 2.24 \[ \int \frac {\sin ^3(x)}{(a \cos (x)+b \sin (x))^2} \, dx=\frac {2 \, a^{5} - 2 \, a^{3} b^{2} - 4 \, a b^{4} + 2 \, {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \cos \left (x\right )^{2} - 2 \, {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (x\right ) \sin \left (x\right ) + 3 \, {\left (a^{3} b \cos \left (x\right ) + a^{2} b^{2} \sin \left (x\right )\right )} \sqrt {a^{2} + b^{2}} \log \left (-\frac {2 \, a b \cos \left (x\right ) \sin \left (x\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - 2 \, a^{2} - b^{2} + 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (x\right ) - a \sin \left (x\right )\right )}}{2 \, a b \cos \left (x\right ) \sin \left (x\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + b^{2}}\right )}{2 \, {\left ({\left (a^{7} + 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} + a b^{6}\right )} \cos \left (x\right ) + {\left (a^{6} b + 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} + b^{7}\right )} \sin \left (x\right )\right )}} \]
1/2*(2*a^5 - 2*a^3*b^2 - 4*a*b^4 + 2*(a^5 + 2*a^3*b^2 + a*b^4)*cos(x)^2 - 2*(a^4*b + 2*a^2*b^3 + b^5)*cos(x)*sin(x) + 3*(a^3*b*cos(x) + a^2*b^2*sin( x))*sqrt(a^2 + b^2)*log(-(2*a*b*cos(x)*sin(x) + (a^2 - b^2)*cos(x)^2 - 2*a ^2 - b^2 + 2*sqrt(a^2 + b^2)*(b*cos(x) - a*sin(x)))/(2*a*b*cos(x)*sin(x) + (a^2 - b^2)*cos(x)^2 + b^2)))/((a^7 + 3*a^5*b^2 + 3*a^3*b^4 + a*b^6)*cos( x) + (a^6*b + 3*a^4*b^3 + 3*a^2*b^5 + b^7)*sin(x))
Timed out. \[ \int \frac {\sin ^3(x)}{(a \cos (x)+b \sin (x))^2} \, dx=\text {Timed out} \]
Leaf count of result is larger than twice the leaf count of optimal. 253 vs. \(2 (99) = 198\).
Time = 0.31 (sec) , antiderivative size = 253, normalized size of antiderivative = 2.36 \[ \int \frac {\sin ^3(x)}{(a \cos (x)+b \sin (x))^2} \, dx=-\frac {3 \, a^{2} b \log \left (\frac {b - \frac {a \sin \left (x\right )}{\cos \left (x\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (x\right )}{\cos \left (x\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {a^{2} + b^{2}}} + \frac {2 \, {\left (2 \, a^{3} - a b^{2} - \frac {3 \, a b^{2} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {3 \, a^{2} b \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {{\left (a^{2} b - 2 \, b^{3}\right )} \sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}}{a^{5} + 2 \, a^{3} b^{2} + a b^{4} + \frac {2 \, {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {2 \, {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} - \frac {{\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}}} \]
-3*a^2*b*log((b - a*sin(x)/(cos(x) + 1) + sqrt(a^2 + b^2))/(b - a*sin(x)/( cos(x) + 1) - sqrt(a^2 + b^2)))/((a^4 + 2*a^2*b^2 + b^4)*sqrt(a^2 + b^2)) + 2*(2*a^3 - a*b^2 - 3*a*b^2*sin(x)^2/(cos(x) + 1)^2 + 3*a^2*b*sin(x)^3/(c os(x) + 1)^3 + (a^2*b - 2*b^3)*sin(x)/(cos(x) + 1))/(a^5 + 2*a^3*b^2 + a*b ^4 + 2*(a^4*b + 2*a^2*b^3 + b^5)*sin(x)/(cos(x) + 1) + 2*(a^4*b + 2*a^2*b^ 3 + b^5)*sin(x)^3/(cos(x) + 1)^3 - (a^5 + 2*a^3*b^2 + a*b^4)*sin(x)^4/(cos (x) + 1)^4)
Time = 0.31 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.74 \[ \int \frac {\sin ^3(x)}{(a \cos (x)+b \sin (x))^2} \, dx=-\frac {3 \, a^{2} b \log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, x\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, x\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {a^{2} + b^{2}}} - \frac {2 \, {\left (3 \, a^{2} b \tan \left (\frac {1}{2} \, x\right )^{3} - 3 \, a b^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + a^{2} b \tan \left (\frac {1}{2} \, x\right ) - 2 \, b^{3} \tan \left (\frac {1}{2} \, x\right ) + 2 \, a^{3} - a b^{2}\right )}}{{\left (a \tan \left (\frac {1}{2} \, x\right )^{4} - 2 \, b \tan \left (\frac {1}{2} \, x\right )^{3} - 2 \, b \tan \left (\frac {1}{2} \, x\right ) - a\right )} {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}} \]
-3*a^2*b*log(abs(2*a*tan(1/2*x) - 2*b - 2*sqrt(a^2 + b^2))/abs(2*a*tan(1/2 *x) - 2*b + 2*sqrt(a^2 + b^2)))/((a^4 + 2*a^2*b^2 + b^4)*sqrt(a^2 + b^2)) - 2*(3*a^2*b*tan(1/2*x)^3 - 3*a*b^2*tan(1/2*x)^2 + a^2*b*tan(1/2*x) - 2*b^ 3*tan(1/2*x) + 2*a^3 - a*b^2)/((a*tan(1/2*x)^4 - 2*b*tan(1/2*x)^3 - 2*b*ta n(1/2*x) - a)*(a^4 + 2*a^2*b^2 + b^4))
Time = 21.87 (sec) , antiderivative size = 224, normalized size of antiderivative = 2.09 \[ \int \frac {\sin ^3(x)}{(a \cos (x)+b \sin (x))^2} \, dx=-\frac {\frac {2\,\left (a\,b^2-2\,a^3\right )}{a^4+2\,a^2\,b^2+b^4}-\frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (a^2\,b-2\,b^3\right )}{a^4+2\,a^2\,b^2+b^4}+\frac {6\,a\,b^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{a^4+2\,a^2\,b^2+b^4}-\frac {6\,a^2\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{a^4+2\,a^2\,b^2+b^4}}{-a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+2\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+2\,b\,\mathrm {tan}\left (\frac {x}{2}\right )+a}-\frac {6\,a^2\,b\,\mathrm {atanh}\left (\frac {2\,a^4\,b+2\,b^5+4\,a^2\,b^3-2\,a\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (a^4+2\,a^2\,b^2+b^4\right )}{2\,{\left (a^2+b^2\right )}^{5/2}}\right )}{{\left (a^2+b^2\right )}^{5/2}} \]
- ((2*(a*b^2 - 2*a^3))/(a^4 + b^4 + 2*a^2*b^2) - (2*tan(x/2)*(a^2*b - 2*b^ 3))/(a^4 + b^4 + 2*a^2*b^2) + (6*a*b^2*tan(x/2)^2)/(a^4 + b^4 + 2*a^2*b^2) - (6*a^2*b*tan(x/2)^3)/(a^4 + b^4 + 2*a^2*b^2))/(a + 2*b*tan(x/2) - a*tan (x/2)^4 + 2*b*tan(x/2)^3) - (6*a^2*b*atanh((2*a^4*b + 2*b^5 + 4*a^2*b^3 - 2*a*tan(x/2)*(a^4 + b^4 + 2*a^2*b^2))/(2*(a^2 + b^2)^(5/2))))/(a^2 + b^2)^ (5/2)